/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.Enumerator;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.hl7.v3.ActClassSupply;
import org.hl7.v3.BL1;
import org.hl7.v3.CD;
import org.hl7.v3.CE;
import org.hl7.v3.CS1;
import org.hl7.v3.ED;
import org.hl7.v3.II;
import org.hl7.v3.IVLINT;
import org.hl7.v3.IVLTS;
import org.hl7.v3.POCDMT000040Author;
import org.hl7.v3.POCDMT000040EntryRelationship;
import org.hl7.v3.POCDMT000040Informant12;
import org.hl7.v3.POCDMT000040InfrastructureRootTypeId;
import org.hl7.v3.POCDMT000040Participant2;
import org.hl7.v3.POCDMT000040Performer2;
import org.hl7.v3.POCDMT000040Precondition;
import org.hl7.v3.POCDMT000040Product;
import org.hl7.v3.POCDMT000040Reference;
import org.hl7.v3.POCDMT000040Specimen;
import org.hl7.v3.POCDMT000040Subject;
import org.hl7.v3.POCDMT000040Supply;
import org.hl7.v3.PQ;
import org.hl7.v3.SXCMTS;
import org.hl7.v3.V3Package;
import org.hl7.v3.XDocumentSubstanceMood;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>POCDMT000040 Supply</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getRealmCode <em>Realm Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getTypeId <em>Type Id</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getTemplateId <em>Template Id</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getId <em>Id</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getCode <em>Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getText <em>Text</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getStatusCode <em>Status Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getEffectiveTime <em>Effective Time</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getPriorityCode <em>Priority Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getRepeatNumber <em>Repeat Number</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getIndependentInd <em>Independent Ind</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getQuantity <em>Quantity</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getExpectedUseTime <em>Expected Use Time</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getSubject <em>Subject</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getSpecimen <em>Specimen</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getProduct <em>Product</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getPerformer <em>Performer</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getAuthor <em>Author</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getInformant <em>Informant</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getParticipant <em>Participant</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getEntryRelationship <em>Entry Relationship</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getReference <em>Reference</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getPrecondition <em>Precondition</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getClassCode <em>Class Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getMoodCode <em>Mood Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040SupplyImpl#getNullFlavor <em>Null Flavor</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class POCDMT000040SupplyImpl extends EObjectImpl implements POCDMT000040Supply {
	/**
	 * The cached value of the '{@link #getRealmCode() <em>Realm Code</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRealmCode()
	 * @generated
	 * @ordered
	 */
	protected EList<CS1> realmCode;

	/**
	 * The cached value of the '{@link #getTypeId() <em>Type Id</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTypeId()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040InfrastructureRootTypeId typeId;

	/**
	 * The cached value of the '{@link #getTemplateId() <em>Template Id</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTemplateId()
	 * @generated
	 * @ordered
	 */
	protected EList<II> templateId;

	/**
	 * The cached value of the '{@link #getId() <em>Id</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getId()
	 * @generated
	 * @ordered
	 */
	protected EList<II> id;

	/**
	 * The cached value of the '{@link #getCode() <em>Code</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCode()
	 * @generated
	 * @ordered
	 */
	protected CD code;

	/**
	 * The cached value of the '{@link #getText() <em>Text</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getText()
	 * @generated
	 * @ordered
	 */
	protected ED text;

	/**
	 * The cached value of the '{@link #getStatusCode() <em>Status Code</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getStatusCode()
	 * @generated
	 * @ordered
	 */
	protected CS1 statusCode;

	/**
	 * The cached value of the '{@link #getEffectiveTime() <em>Effective Time</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEffectiveTime()
	 * @generated
	 * @ordered
	 */
	protected EList<SXCMTS> effectiveTime;

	/**
	 * The cached value of the '{@link #getPriorityCode() <em>Priority Code</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPriorityCode()
	 * @generated
	 * @ordered
	 */
	protected EList<CE> priorityCode;

	/**
	 * The cached value of the '{@link #getRepeatNumber() <em>Repeat Number</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRepeatNumber()
	 * @generated
	 * @ordered
	 */
	protected IVLINT repeatNumber;

	/**
	 * The cached value of the '{@link #getIndependentInd() <em>Independent Ind</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIndependentInd()
	 * @generated
	 * @ordered
	 */
	protected BL1 independentInd;

	/**
	 * The cached value of the '{@link #getQuantity() <em>Quantity</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQuantity()
	 * @generated
	 * @ordered
	 */
	protected PQ quantity;

	/**
	 * The cached value of the '{@link #getExpectedUseTime() <em>Expected Use Time</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpectedUseTime()
	 * @generated
	 * @ordered
	 */
	protected IVLTS expectedUseTime;

	/**
	 * The cached value of the '{@link #getSubject() <em>Subject</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSubject()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Subject subject;

	/**
	 * The cached value of the '{@link #getSpecimen() <em>Specimen</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSpecimen()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Specimen> specimen;

	/**
	 * The cached value of the '{@link #getProduct() <em>Product</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProduct()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Product product;

	/**
	 * The cached value of the '{@link #getPerformer() <em>Performer</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPerformer()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Performer2> performer;

	/**
	 * The cached value of the '{@link #getAuthor() <em>Author</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAuthor()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Author> author;

	/**
	 * The cached value of the '{@link #getInformant() <em>Informant</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInformant()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Informant12> informant;

	/**
	 * The cached value of the '{@link #getParticipant() <em>Participant</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getParticipant()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Participant2> participant;

	/**
	 * The cached value of the '{@link #getEntryRelationship() <em>Entry Relationship</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEntryRelationship()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040EntryRelationship> entryRelationship;

	/**
	 * The cached value of the '{@link #getReference() <em>Reference</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getReference()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Reference> reference;

	/**
	 * The cached value of the '{@link #getPrecondition() <em>Precondition</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPrecondition()
	 * @generated
	 * @ordered
	 */
	protected EList<POCDMT000040Precondition> precondition;

	/**
	 * The default value of the '{@link #getClassCode() <em>Class Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getClassCode()
	 * @generated
	 * @ordered
	 */
	protected static final ActClassSupply CLASS_CODE_EDEFAULT = ActClassSupply.SPLY;

	/**
	 * The cached value of the '{@link #getClassCode() <em>Class Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getClassCode()
	 * @generated
	 * @ordered
	 */
	protected ActClassSupply classCode = CLASS_CODE_EDEFAULT;

	/**
	 * This is true if the Class Code attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean classCodeESet;

	/**
	 * The default value of the '{@link #getMoodCode() <em>Mood Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMoodCode()
	 * @generated
	 * @ordered
	 */
	protected static final XDocumentSubstanceMood MOOD_CODE_EDEFAULT = XDocumentSubstanceMood.EVN;

	/**
	 * The cached value of the '{@link #getMoodCode() <em>Mood Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMoodCode()
	 * @generated
	 * @ordered
	 */
	protected XDocumentSubstanceMood moodCode = MOOD_CODE_EDEFAULT;

	/**
	 * This is true if the Mood Code attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean moodCodeESet;

	/**
	 * The default value of the '{@link #getNullFlavor() <em>Null Flavor</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNullFlavor()
	 * @generated
	 * @ordered
	 */
	protected static final Enumerator NULL_FLAVOR_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getNullFlavor() <em>Null Flavor</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNullFlavor()
	 * @generated
	 * @ordered
	 */
	protected Enumerator nullFlavor = NULL_FLAVOR_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected POCDMT000040SupplyImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return V3Package.eINSTANCE.getPOCDMT000040Supply();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<CS1> getRealmCode() {
		if (realmCode == null) {
			realmCode = new EObjectContainmentEList<CS1>(CS1.class, this, V3Package.POCDMT000040_SUPPLY__REALM_CODE);
		}
		return realmCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040InfrastructureRootTypeId getTypeId() {
		return typeId;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetTypeId(POCDMT000040InfrastructureRootTypeId newTypeId, NotificationChain msgs) {
		POCDMT000040InfrastructureRootTypeId oldTypeId = typeId;
		typeId = newTypeId;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__TYPE_ID, oldTypeId, newTypeId);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTypeId(POCDMT000040InfrastructureRootTypeId newTypeId) {
		if (newTypeId != typeId) {
			NotificationChain msgs = null;
			if (typeId != null)
				msgs = ((InternalEObject)typeId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__TYPE_ID, null, msgs);
			if (newTypeId != null)
				msgs = ((InternalEObject)newTypeId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__TYPE_ID, null, msgs);
			msgs = basicSetTypeId(newTypeId, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__TYPE_ID, newTypeId, newTypeId));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<II> getTemplateId() {
		if (templateId == null) {
			templateId = new EObjectContainmentEList<II>(II.class, this, V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID);
		}
		return templateId;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<II> getId() {
		if (id == null) {
			id = new EObjectContainmentEList<II>(II.class, this, V3Package.POCDMT000040_SUPPLY__ID);
		}
		return id;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CD getCode() {
		return code;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetCode(CD newCode, NotificationChain msgs) {
		CD oldCode = code;
		code = newCode;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__CODE, oldCode, newCode);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCode(CD newCode) {
		if (newCode != code) {
			NotificationChain msgs = null;
			if (code != null)
				msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__CODE, null, msgs);
			if (newCode != null)
				msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__CODE, null, msgs);
			msgs = basicSetCode(newCode, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__CODE, newCode, newCode));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ED getText() {
		return text;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetText(ED newText, NotificationChain msgs) {
		ED oldText = text;
		text = newText;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__TEXT, oldText, newText);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setText(ED newText) {
		if (newText != text) {
			NotificationChain msgs = null;
			if (text != null)
				msgs = ((InternalEObject)text).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__TEXT, null, msgs);
			if (newText != null)
				msgs = ((InternalEObject)newText).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__TEXT, null, msgs);
			msgs = basicSetText(newText, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__TEXT, newText, newText));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CS1 getStatusCode() {
		return statusCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetStatusCode(CS1 newStatusCode, NotificationChain msgs) {
		CS1 oldStatusCode = statusCode;
		statusCode = newStatusCode;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__STATUS_CODE, oldStatusCode, newStatusCode);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setStatusCode(CS1 newStatusCode) {
		if (newStatusCode != statusCode) {
			NotificationChain msgs = null;
			if (statusCode != null)
				msgs = ((InternalEObject)statusCode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__STATUS_CODE, null, msgs);
			if (newStatusCode != null)
				msgs = ((InternalEObject)newStatusCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__STATUS_CODE, null, msgs);
			msgs = basicSetStatusCode(newStatusCode, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__STATUS_CODE, newStatusCode, newStatusCode));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<SXCMTS> getEffectiveTime() {
		if (effectiveTime == null) {
			effectiveTime = new EObjectContainmentEList<SXCMTS>(SXCMTS.class, this, V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME);
		}
		return effectiveTime;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<CE> getPriorityCode() {
		if (priorityCode == null) {
			priorityCode = new EObjectContainmentEList<CE>(CE.class, this, V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE);
		}
		return priorityCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IVLINT getRepeatNumber() {
		return repeatNumber;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetRepeatNumber(IVLINT newRepeatNumber, NotificationChain msgs) {
		IVLINT oldRepeatNumber = repeatNumber;
		repeatNumber = newRepeatNumber;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER, oldRepeatNumber, newRepeatNumber);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRepeatNumber(IVLINT newRepeatNumber) {
		if (newRepeatNumber != repeatNumber) {
			NotificationChain msgs = null;
			if (repeatNumber != null)
				msgs = ((InternalEObject)repeatNumber).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER, null, msgs);
			if (newRepeatNumber != null)
				msgs = ((InternalEObject)newRepeatNumber).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER, null, msgs);
			msgs = basicSetRepeatNumber(newRepeatNumber, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER, newRepeatNumber, newRepeatNumber));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BL1 getIndependentInd() {
		return independentInd;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetIndependentInd(BL1 newIndependentInd, NotificationChain msgs) {
		BL1 oldIndependentInd = independentInd;
		independentInd = newIndependentInd;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND, oldIndependentInd, newIndependentInd);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIndependentInd(BL1 newIndependentInd) {
		if (newIndependentInd != independentInd) {
			NotificationChain msgs = null;
			if (independentInd != null)
				msgs = ((InternalEObject)independentInd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND, null, msgs);
			if (newIndependentInd != null)
				msgs = ((InternalEObject)newIndependentInd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND, null, msgs);
			msgs = basicSetIndependentInd(newIndependentInd, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND, newIndependentInd, newIndependentInd));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PQ getQuantity() {
		return quantity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetQuantity(PQ newQuantity, NotificationChain msgs) {
		PQ oldQuantity = quantity;
		quantity = newQuantity;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__QUANTITY, oldQuantity, newQuantity);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setQuantity(PQ newQuantity) {
		if (newQuantity != quantity) {
			NotificationChain msgs = null;
			if (quantity != null)
				msgs = ((InternalEObject)quantity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__QUANTITY, null, msgs);
			if (newQuantity != null)
				msgs = ((InternalEObject)newQuantity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__QUANTITY, null, msgs);
			msgs = basicSetQuantity(newQuantity, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__QUANTITY, newQuantity, newQuantity));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IVLTS getExpectedUseTime() {
		return expectedUseTime;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetExpectedUseTime(IVLTS newExpectedUseTime, NotificationChain msgs) {
		IVLTS oldExpectedUseTime = expectedUseTime;
		expectedUseTime = newExpectedUseTime;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME, oldExpectedUseTime, newExpectedUseTime);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExpectedUseTime(IVLTS newExpectedUseTime) {
		if (newExpectedUseTime != expectedUseTime) {
			NotificationChain msgs = null;
			if (expectedUseTime != null)
				msgs = ((InternalEObject)expectedUseTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME, null, msgs);
			if (newExpectedUseTime != null)
				msgs = ((InternalEObject)newExpectedUseTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME, null, msgs);
			msgs = basicSetExpectedUseTime(newExpectedUseTime, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME, newExpectedUseTime, newExpectedUseTime));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Subject getSubject() {
		return subject;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetSubject(POCDMT000040Subject newSubject, NotificationChain msgs) {
		POCDMT000040Subject oldSubject = subject;
		subject = newSubject;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__SUBJECT, oldSubject, newSubject);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSubject(POCDMT000040Subject newSubject) {
		if (newSubject != subject) {
			NotificationChain msgs = null;
			if (subject != null)
				msgs = ((InternalEObject)subject).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__SUBJECT, null, msgs);
			if (newSubject != null)
				msgs = ((InternalEObject)newSubject).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__SUBJECT, null, msgs);
			msgs = basicSetSubject(newSubject, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__SUBJECT, newSubject, newSubject));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Specimen> getSpecimen() {
		if (specimen == null) {
			specimen = new EObjectContainmentEList<POCDMT000040Specimen>(POCDMT000040Specimen.class, this, V3Package.POCDMT000040_SUPPLY__SPECIMEN);
		}
		return specimen;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Product getProduct() {
		return product;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetProduct(POCDMT000040Product newProduct, NotificationChain msgs) {
		POCDMT000040Product oldProduct = product;
		product = newProduct;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__PRODUCT, oldProduct, newProduct);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProduct(POCDMT000040Product newProduct) {
		if (newProduct != product) {
			NotificationChain msgs = null;
			if (product != null)
				msgs = ((InternalEObject)product).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__PRODUCT, null, msgs);
			if (newProduct != null)
				msgs = ((InternalEObject)newProduct).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_SUPPLY__PRODUCT, null, msgs);
			msgs = basicSetProduct(newProduct, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__PRODUCT, newProduct, newProduct));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Performer2> getPerformer() {
		if (performer == null) {
			performer = new EObjectContainmentEList<POCDMT000040Performer2>(POCDMT000040Performer2.class, this, V3Package.POCDMT000040_SUPPLY__PERFORMER);
		}
		return performer;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Author> getAuthor() {
		if (author == null) {
			author = new EObjectContainmentEList<POCDMT000040Author>(POCDMT000040Author.class, this, V3Package.POCDMT000040_SUPPLY__AUTHOR);
		}
		return author;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Informant12> getInformant() {
		if (informant == null) {
			informant = new EObjectContainmentEList<POCDMT000040Informant12>(POCDMT000040Informant12.class, this, V3Package.POCDMT000040_SUPPLY__INFORMANT);
		}
		return informant;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Participant2> getParticipant() {
		if (participant == null) {
			participant = new EObjectContainmentEList<POCDMT000040Participant2>(POCDMT000040Participant2.class, this, V3Package.POCDMT000040_SUPPLY__PARTICIPANT);
		}
		return participant;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040EntryRelationship> getEntryRelationship() {
		if (entryRelationship == null) {
			entryRelationship = new EObjectContainmentEList<POCDMT000040EntryRelationship>(POCDMT000040EntryRelationship.class, this, V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP);
		}
		return entryRelationship;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Reference> getReference() {
		if (reference == null) {
			reference = new EObjectContainmentEList<POCDMT000040Reference>(POCDMT000040Reference.class, this, V3Package.POCDMT000040_SUPPLY__REFERENCE);
		}
		return reference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<POCDMT000040Precondition> getPrecondition() {
		if (precondition == null) {
			precondition = new EObjectContainmentEList<POCDMT000040Precondition>(POCDMT000040Precondition.class, this, V3Package.POCDMT000040_SUPPLY__PRECONDITION);
		}
		return precondition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActClassSupply getClassCode() {
		return classCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setClassCode(ActClassSupply newClassCode) {
		ActClassSupply oldClassCode = classCode;
		classCode = newClassCode == null ? CLASS_CODE_EDEFAULT : newClassCode;
		boolean oldClassCodeESet = classCodeESet;
		classCodeESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__CLASS_CODE, oldClassCode, classCode, !oldClassCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetClassCode() {
		ActClassSupply oldClassCode = classCode;
		boolean oldClassCodeESet = classCodeESet;
		classCode = CLASS_CODE_EDEFAULT;
		classCodeESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.POCDMT000040_SUPPLY__CLASS_CODE, oldClassCode, CLASS_CODE_EDEFAULT, oldClassCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetClassCode() {
		return classCodeESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public XDocumentSubstanceMood getMoodCode() {
		return moodCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setMoodCode(XDocumentSubstanceMood newMoodCode) {
		XDocumentSubstanceMood oldMoodCode = moodCode;
		moodCode = newMoodCode == null ? MOOD_CODE_EDEFAULT : newMoodCode;
		boolean oldMoodCodeESet = moodCodeESet;
		moodCodeESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__MOOD_CODE, oldMoodCode, moodCode, !oldMoodCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetMoodCode() {
		XDocumentSubstanceMood oldMoodCode = moodCode;
		boolean oldMoodCodeESet = moodCodeESet;
		moodCode = MOOD_CODE_EDEFAULT;
		moodCodeESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.POCDMT000040_SUPPLY__MOOD_CODE, oldMoodCode, MOOD_CODE_EDEFAULT, oldMoodCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetMoodCode() {
		return moodCodeESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Enumerator getNullFlavor() {
		return nullFlavor;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNullFlavor(Enumerator newNullFlavor) {
		Enumerator oldNullFlavor = nullFlavor;
		nullFlavor = newNullFlavor;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_SUPPLY__NULL_FLAVOR, oldNullFlavor, nullFlavor));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case V3Package.POCDMT000040_SUPPLY__REALM_CODE:
				return ((InternalEList<?>)getRealmCode()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__TYPE_ID:
				return basicSetTypeId(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID:
				return ((InternalEList<?>)getTemplateId()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__ID:
				return ((InternalEList<?>)getId()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__CODE:
				return basicSetCode(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__TEXT:
				return basicSetText(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__STATUS_CODE:
				return basicSetStatusCode(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME:
				return ((InternalEList<?>)getEffectiveTime()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE:
				return ((InternalEList<?>)getPriorityCode()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER:
				return basicSetRepeatNumber(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND:
				return basicSetIndependentInd(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__QUANTITY:
				return basicSetQuantity(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME:
				return basicSetExpectedUseTime(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__SUBJECT:
				return basicSetSubject(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__SPECIMEN:
				return ((InternalEList<?>)getSpecimen()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__PRODUCT:
				return basicSetProduct(null, msgs);
			case V3Package.POCDMT000040_SUPPLY__PERFORMER:
				return ((InternalEList<?>)getPerformer()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__AUTHOR:
				return ((InternalEList<?>)getAuthor()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__INFORMANT:
				return ((InternalEList<?>)getInformant()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__PARTICIPANT:
				return ((InternalEList<?>)getParticipant()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP:
				return ((InternalEList<?>)getEntryRelationship()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__REFERENCE:
				return ((InternalEList<?>)getReference()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_SUPPLY__PRECONDITION:
				return ((InternalEList<?>)getPrecondition()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case V3Package.POCDMT000040_SUPPLY__REALM_CODE:
				return getRealmCode();
			case V3Package.POCDMT000040_SUPPLY__TYPE_ID:
				return getTypeId();
			case V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID:
				return getTemplateId();
			case V3Package.POCDMT000040_SUPPLY__ID:
				return getId();
			case V3Package.POCDMT000040_SUPPLY__CODE:
				return getCode();
			case V3Package.POCDMT000040_SUPPLY__TEXT:
				return getText();
			case V3Package.POCDMT000040_SUPPLY__STATUS_CODE:
				return getStatusCode();
			case V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME:
				return getEffectiveTime();
			case V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE:
				return getPriorityCode();
			case V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER:
				return getRepeatNumber();
			case V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND:
				return getIndependentInd();
			case V3Package.POCDMT000040_SUPPLY__QUANTITY:
				return getQuantity();
			case V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME:
				return getExpectedUseTime();
			case V3Package.POCDMT000040_SUPPLY__SUBJECT:
				return getSubject();
			case V3Package.POCDMT000040_SUPPLY__SPECIMEN:
				return getSpecimen();
			case V3Package.POCDMT000040_SUPPLY__PRODUCT:
				return getProduct();
			case V3Package.POCDMT000040_SUPPLY__PERFORMER:
				return getPerformer();
			case V3Package.POCDMT000040_SUPPLY__AUTHOR:
				return getAuthor();
			case V3Package.POCDMT000040_SUPPLY__INFORMANT:
				return getInformant();
			case V3Package.POCDMT000040_SUPPLY__PARTICIPANT:
				return getParticipant();
			case V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP:
				return getEntryRelationship();
			case V3Package.POCDMT000040_SUPPLY__REFERENCE:
				return getReference();
			case V3Package.POCDMT000040_SUPPLY__PRECONDITION:
				return getPrecondition();
			case V3Package.POCDMT000040_SUPPLY__CLASS_CODE:
				return getClassCode();
			case V3Package.POCDMT000040_SUPPLY__MOOD_CODE:
				return getMoodCode();
			case V3Package.POCDMT000040_SUPPLY__NULL_FLAVOR:
				return getNullFlavor();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case V3Package.POCDMT000040_SUPPLY__REALM_CODE:
				getRealmCode().clear();
				getRealmCode().addAll((Collection<? extends CS1>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__TYPE_ID:
				setTypeId((POCDMT000040InfrastructureRootTypeId)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID:
				getTemplateId().clear();
				getTemplateId().addAll((Collection<? extends II>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__ID:
				getId().clear();
				getId().addAll((Collection<? extends II>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__CODE:
				setCode((CD)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__TEXT:
				setText((ED)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__STATUS_CODE:
				setStatusCode((CS1)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME:
				getEffectiveTime().clear();
				getEffectiveTime().addAll((Collection<? extends SXCMTS>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE:
				getPriorityCode().clear();
				getPriorityCode().addAll((Collection<? extends CE>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER:
				setRepeatNumber((IVLINT)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND:
				setIndependentInd((BL1)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__QUANTITY:
				setQuantity((PQ)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME:
				setExpectedUseTime((IVLTS)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__SUBJECT:
				setSubject((POCDMT000040Subject)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__SPECIMEN:
				getSpecimen().clear();
				getSpecimen().addAll((Collection<? extends POCDMT000040Specimen>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__PRODUCT:
				setProduct((POCDMT000040Product)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__PERFORMER:
				getPerformer().clear();
				getPerformer().addAll((Collection<? extends POCDMT000040Performer2>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__AUTHOR:
				getAuthor().clear();
				getAuthor().addAll((Collection<? extends POCDMT000040Author>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__INFORMANT:
				getInformant().clear();
				getInformant().addAll((Collection<? extends POCDMT000040Informant12>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__PARTICIPANT:
				getParticipant().clear();
				getParticipant().addAll((Collection<? extends POCDMT000040Participant2>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP:
				getEntryRelationship().clear();
				getEntryRelationship().addAll((Collection<? extends POCDMT000040EntryRelationship>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__REFERENCE:
				getReference().clear();
				getReference().addAll((Collection<? extends POCDMT000040Reference>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__PRECONDITION:
				getPrecondition().clear();
				getPrecondition().addAll((Collection<? extends POCDMT000040Precondition>)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__CLASS_CODE:
				setClassCode((ActClassSupply)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__MOOD_CODE:
				setMoodCode((XDocumentSubstanceMood)newValue);
				return;
			case V3Package.POCDMT000040_SUPPLY__NULL_FLAVOR:
				setNullFlavor((Enumerator)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case V3Package.POCDMT000040_SUPPLY__REALM_CODE:
				getRealmCode().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__TYPE_ID:
				setTypeId((POCDMT000040InfrastructureRootTypeId)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID:
				getTemplateId().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__ID:
				getId().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__CODE:
				setCode((CD)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__TEXT:
				setText((ED)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__STATUS_CODE:
				setStatusCode((CS1)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME:
				getEffectiveTime().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE:
				getPriorityCode().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER:
				setRepeatNumber((IVLINT)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND:
				setIndependentInd((BL1)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__QUANTITY:
				setQuantity((PQ)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME:
				setExpectedUseTime((IVLTS)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__SUBJECT:
				setSubject((POCDMT000040Subject)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__SPECIMEN:
				getSpecimen().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__PRODUCT:
				setProduct((POCDMT000040Product)null);
				return;
			case V3Package.POCDMT000040_SUPPLY__PERFORMER:
				getPerformer().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__AUTHOR:
				getAuthor().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__INFORMANT:
				getInformant().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__PARTICIPANT:
				getParticipant().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP:
				getEntryRelationship().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__REFERENCE:
				getReference().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__PRECONDITION:
				getPrecondition().clear();
				return;
			case V3Package.POCDMT000040_SUPPLY__CLASS_CODE:
				unsetClassCode();
				return;
			case V3Package.POCDMT000040_SUPPLY__MOOD_CODE:
				unsetMoodCode();
				return;
			case V3Package.POCDMT000040_SUPPLY__NULL_FLAVOR:
				setNullFlavor(NULL_FLAVOR_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case V3Package.POCDMT000040_SUPPLY__REALM_CODE:
				return realmCode != null && !realmCode.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__TYPE_ID:
				return typeId != null;
			case V3Package.POCDMT000040_SUPPLY__TEMPLATE_ID:
				return templateId != null && !templateId.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__ID:
				return id != null && !id.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__CODE:
				return code != null;
			case V3Package.POCDMT000040_SUPPLY__TEXT:
				return text != null;
			case V3Package.POCDMT000040_SUPPLY__STATUS_CODE:
				return statusCode != null;
			case V3Package.POCDMT000040_SUPPLY__EFFECTIVE_TIME:
				return effectiveTime != null && !effectiveTime.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__PRIORITY_CODE:
				return priorityCode != null && !priorityCode.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__REPEAT_NUMBER:
				return repeatNumber != null;
			case V3Package.POCDMT000040_SUPPLY__INDEPENDENT_IND:
				return independentInd != null;
			case V3Package.POCDMT000040_SUPPLY__QUANTITY:
				return quantity != null;
			case V3Package.POCDMT000040_SUPPLY__EXPECTED_USE_TIME:
				return expectedUseTime != null;
			case V3Package.POCDMT000040_SUPPLY__SUBJECT:
				return subject != null;
			case V3Package.POCDMT000040_SUPPLY__SPECIMEN:
				return specimen != null && !specimen.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__PRODUCT:
				return product != null;
			case V3Package.POCDMT000040_SUPPLY__PERFORMER:
				return performer != null && !performer.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__AUTHOR:
				return author != null && !author.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__INFORMANT:
				return informant != null && !informant.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__PARTICIPANT:
				return participant != null && !participant.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__ENTRY_RELATIONSHIP:
				return entryRelationship != null && !entryRelationship.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__REFERENCE:
				return reference != null && !reference.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__PRECONDITION:
				return precondition != null && !precondition.isEmpty();
			case V3Package.POCDMT000040_SUPPLY__CLASS_CODE:
				return isSetClassCode();
			case V3Package.POCDMT000040_SUPPLY__MOOD_CODE:
				return isSetMoodCode();
			case V3Package.POCDMT000040_SUPPLY__NULL_FLAVOR:
				return NULL_FLAVOR_EDEFAULT == null ? nullFlavor != null : !NULL_FLAVOR_EDEFAULT.equals(nullFlavor);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (classCode: ");
		if (classCodeESet) result.append(classCode); else result.append("<unset>");
		result.append(", moodCode: ");
		if (moodCodeESet) result.append(moodCode); else result.append("<unset>");
		result.append(", nullFlavor: ");
		result.append(nullFlavor);
		result.append(')');
		return result.toString();
	}

} //POCDMT000040SupplyImpl
